Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve scroll syncing #21622

Merged
merged 4 commits into from
Apr 22, 2024
Merged

feat: improve scroll syncing #21622

merged 4 commits into from
Apr 22, 2024

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Apr 17, 2024

Problem

Before we had some complicated logic around when the scroll was synced

Towards #21302

Changes

  • Removed double concept of "scrolling" and "paused"
  • "Sync scrolling" button appears when a user manually scrolls / opens an inspector item
Screenshot 2024-04-17 at 19 15 50

Copy link
Contributor

github-actions bot commented Apr 17, 2024

Size Change: +2 B (0%)

Total Size: 1.01 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.01 MB +2 B (0%)

compressed-size-action

@daibhin daibhin requested a review from a team April 19, 2024 10:32
@@ -161,12 +159,12 @@ export function PlayerInspectorList(): JSX.Element {
.getElementById('PlayerInspectorListMarker')
?.setAttribute('style', `transform: translateY(${offset}px)`)

if (!syncScrollingPaused && syncScroll) {
if (!syncScrollPaused) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should syncSrollPaused and listRef be dependencies of the useEffect?

(more a "teach me" question than anything else :)

if (listRef.current) {
listRef.current.scrollToRow(playbackIndicatorIndex)
}
// Tricky: Need to dely to make sure the row scrolled has finished
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Tricky: Need to dely to make sure the row scrolled has finished
// Tricky: Need to delay to make sure the row scrolled has finished

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@daibhin daibhin merged commit 59e0196 into master Apr 22, 2024
104 checks passed
@daibhin daibhin deleted the dn-feat/scroll-syncing branch April 22, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants